package com.easy.service.impl;

import com.easy.bean.Cart;
import com.easy.bean.Collect;
import com.easy.dao.CollectDao;
import com.easy.service.ICollectService;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CollectService implements ICollectService {
    @Autowired
    CollectDao collectDao;

    @Override
    public int add(Collect collect) {
        return collectDao.add(collect);
    }

    @Override
    public int edit(Collect collect) {
        return collectDao.edit(collect);
    }

    @Override
    public int delete(int collectid) {
        return collectDao.delete(collectid);
    }

    @Override
    public List<Collect> getList(Page page, String text) {
        return collectDao.getList(page, text);
    }

    @Override
    public Cart getCollectById(int collectid) {
        return collectDao.getCollectById(collectid);
    }

    @Override
    public int getCount(String text) {
        return collectDao.getCount(text);
    }
}
